<?php
/*
 * 权限模块
 */
class ModuleModel extends MY_Model{
	
	function __construct() {
		parent::__construct();
        $this->_table = 'acl_module';
        $this->_primary_id_name = 'mid';
	}

	function selectAll() {
    	$data = $this->db->query('select m.* ,count(p.pid) as pnum from acl_module m left join acl_permission p on m.mid=p.mid group by m.mid order by m.sort');
    	return $data->result_array();
    }
}
?>
